<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<script type="text/javascript" src="<%=basePath%>Js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/mycss/bootstrap.min.css" />
<head>
<meta charset="UTF-8">
<title>AddStaf</title>
<script type="text/javascript">
function addStaf(){
	
	
	alert("添加员工");
}

document.getElementById("stafName").onblur = function () {
    var reg = /^ +|+$/g;
    if (reg.test(this.value)) {
    	
    } else {
    	document.getElementById("#stafNumber").innerHTML = "输入不能为空";
    }
  };

</script>


</head>
<body>

<hr><h3 align="center">添加员工</h3><hr><br>

	<div style="position: absolute; left: 300px; top: 120px; width: 700px; height: 10px">
		<form action="<%=basePath%>addStaf.do" id="myFrom">
			<table class="table table-bordered">
				<tr>
					<td>姓名</td>
					<td><input type="text" class="form-control" name="stafName"
						id="stafName">
					<div id="name"></div></td>
					<td>性别</td>
					<td>
					<label class="single"><input type="radio" name="stafgender" value="男" />男</label>
					<label class="single"><input type="radio" name="stafgender" value="女" />女</label>
					</td>
				</tr>
				<tr>
					<td>年龄</td>
					<td><input type="text" class="form-control" name="stafage"
						id="stafage"></td>
						<td>职位</td>
					<td>
					<select name="stafJob" id="stafJob" class="form-control">
					<c:forEach items="${deplist}" var="list">
						<option value="${list.department}">${list.department}</option>
					</c:forEach>
				      </select>
					</td>
				</tr>
				
				<tr>
					<td>身份证</td>
					<td><input type="text" class="form-control" name="stafId"
						id="stafId"></td>
							<td>居住地址</td>
					<td><input type="text" class="form-control" name="stafAddress"
						id="stafAddress"></td>	
				</tr>
	
				<tr>
					<td>联系电话</td>
					<td><input type="text" class="form-control" name="stafphone"
						id="stafphone"></td>
					<td>班次</td>
					<td>
						<select name="stafWorktime" id="stafWorktime" class="form-control">
						<option value="早班">早班</option>
						<option value="晚班">晚班</option>
						<option value="夜班">夜班</option>
				      </select>
						</td>
				</tr>
			
				<tr>
					
						<td>备注</td>
					<td colspan="3">
					<textarea rows="3" cols="25" name="stafRe" id="stafRe"
								class="form-control"></textarea>
					</td>
				</tr>
				
				<tr>
					<td>操作</td>
					<td colspan="3"><button type="submit" class="btn btn-success">确认添加</button>
						<button type="reset" form="myFrom" class="btn btn-danger">重置</button>
					</td>
				</tr>

			</table>
		</form>
	</div>

</body>
</html>